package com.nisco.dms.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.nisco.dms.entity.Program;

public interface ProgramDao extends JpaRepository<Program, String>
{
	public Page<Program> findByStrNameContaining(Pageable Pageable,String strName);
	
	@Query("select p from Program p where p.strSn like ?1 or p.strName like?1 or p.strDesc like ?1 ")
	public  Page<Program> findByStrSnOrStrNameOrStrDesc(Pageable Pageable,String strSn);
	
	public  Page<Program> findBymenuListId(Pageable Pageable,String menuId);
	
	@Query("from  Program p where p.id=?1 ")
	Program findOne(String id);//根据id查找实体 

}
